package com.example.mysecurity.pojo;

import java.io.Serializable;


public class User implements Serializable {
    private Long id;
    private String username;
    private String password;
    private static final long serialVersionUID = 1L;

//    private Set<GrantedAuthority> authorities;    //授权
//    private boolean accountNonExpired;            //未到期
//    private boolean accountNonLocked;             //未上锁
//    private boolean credentialsNonExpired;        //资格证书未到期
//    private boolean enabled;                      //能否使用

    public User() {
    }
    public User(Long id, String username, String password) {
        this.id = id;
        this.username = username;
        this.password = password;
//        this.authorities = null;
//        this.accountNonExpired = true;
//        this.accountNonLocked = true;
//        this.credentialsNonExpired = true;
//        this.enabled = true;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

//    public Set<GrantedAuthority> getAuthorities() {
//        return authorities;
//    }
//
//    public void setAuthorities(Set<GrantedAuthority> authorities) {
//        this.authorities = authorities;
//    }
//
//    public boolean isAccountNonExpired() {
//        return accountNonExpired;
//    }
//
//    public void setAccountNonExpired(boolean accountNonExpired) {
//        this.accountNonExpired = accountNonExpired;
//    }
//
//    public boolean isAccountNonLocked() {
//        return accountNonLocked;
//    }
//
//    public void setAccountNonLocked(boolean accountNonLocked) {
//        this.accountNonLocked = accountNonLocked;
//    }
//
//    public boolean isCredentialsNonExpired() {
//        return credentialsNonExpired;
//    }
//
//    public void setCredentialsNonExpired(boolean credentialsNonExpired) {
//        this.credentialsNonExpired = credentialsNonExpired;
//    }
//
//    public boolean isEnabled() {
//        return enabled;
//    }
//
//    public void setEnabled(boolean enabled) {
//        this.enabled = enabled;
//    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
//                ", authorities=" + authorities +
//                ", accountNonExpired=" + accountNonExpired +
//                ", accountNonLocked=" + accountNonLocked +
//                ", credentialsNonExpired=" + credentialsNonExpired +
//                ", enabled=" + enabled +
                '}';
    }
}
